import socket

def main():
    host = '192.168.1.103'  # 主机的局域网IP地址，确保与服务器在同一个局域网
    port = 3000             # 与主机相同的端口号

    client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    client_socket.connect((host, port))

    while True:
        data = client_socket.recv(1024).decode('utf-8')
        print("收到消息提示：", data)

    client_socket.close()

if __name__ == "__main__":
    main()
